package VN.EDU.IMIC.DEVELOPER.TRINHCAOSANG.Exam01.Bai1.Bai1;

/**
 * Created by Sang on 07/03/2016.
 */
public class BinhhanhEntity implements IGeometricObject {
    private double canhDay;
    private double canhCheo;
    private double chieuCao;

    public double getChieuCao() {
        return chieuCao;
    }

    public void setChieuCao(double chieuCao) {
        this.chieuCao = chieuCao;
    }

    public double getCanhDay() {
        return canhDay;
    }

    public void setCanhDay(double canhDay) {
        this.canhDay = canhDay;
    }

    public double getCanhCheo() {
        return canhCheo;
    }

    public void setCanhCheo(double canhCheo) {
        this.canhCheo = canhCheo;
    }

    @Override
    public double getArea(Object object) {
        return canhDay * chieuCao;
    }

    @Override
    public double getPerimeter(Object object) {
        return (canhDay + canhCheo) * 2;
    }
}
